package com.cti.commons.mqtt.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.integration.annotation.IntegrationComponentScan;

import com.cti.commons.mqtt.acpect.ConsumerTransactionAspect;
import com.cti.commons.mqtt.handle.MqttMessageProvider;

@Configuration
@ComponentScan(basePackages = "com.cti.commons.mqtt")
@IntegrationComponentScan({"com.cti.commons.mqtt"})
public class MqttMessageAutoConfiguration {

    @Bean
    public ConsumerTransactionAspect consumerTransactionAspect() {
        return new ConsumerTransactionAspect();
    }

    @Bean
    public MqttMessageProvider mqttMessageProvider() {
        return new MqttMessageProvider();
    }

}
